<?php

namespace app\backstage\controller;

use think\Controller;

class Base extends Controller
{
	protected $params;

	protected function initialize()
	{
		if (request()->isPost()) {
			$this->params = request()->param();
			if (empty($this->params)) {
				$data = file_get_contents('php://input');
				$this->params = json_decode($data, true);
			}
		} else {
			$this->params = request()->get();
		}
	}
}